/*
============================================================================
 Name        : dd_mp3_helper.h
 Author      : Jian
 Version     :
 Copyright   : GPL
 Description : dd_mp3_helper.h - header file
============================================================================
*/

#ifndef DD_MP3_HELPER_H
#define DD_MP3_HELPER_H

/* INCLUDES */
#include "dd_define.h"

__DD_BEGIN_DECLS

typedef struct __dd_mp3_helper dd_mp3_helper ;
struct __dd_mp3_first_frame ;
struct __dd_id3v1_tag ;
struct __dd_id3v2_tag ;
struct __dd_audio_img ;

struct __dd_mp3_helper {
    struct __dd_mp3_first_frame* firstFrame ;
    struct __dd_id3v1_tag*       id3v1 ;
    struct __dd_id3v2_tag*       id3v2 ;
};

dd_mp3_helper* dd_mp3h_create() ;

void dd_mp3h_destroy(dd_mp3_helper* helper) ;

/* may be return EDDAgain */
int dd_mp3h_read(dd_mp3_helper* helper, sd_file* file, sd_semp* lock) ;

DD_UTF8* dd_mp3h_title(dd_mp3_helper* helper) ;

DD_UTF8* dd_mp3h_album(dd_mp3_helper* helper) ;

DD_UTF8* dd_mp3h_artist(dd_mp3_helper* helper) ;

struct __dd_audio_img* dd_mp3h_image(dd_mp3_helper* helper) ;

int dd_mp3h_bitrate(dd_mp3_helper* helper) ;

int dd_mp3h_samplerate(dd_mp3_helper* helper) ;

int dd_mp3h_duration(dd_mp3_helper* helper) ;

int dd_mp3h_seek(dd_mp3_helper* helper, int second) ;

__DD_END_DECLS

#endif  /* DD_MP3_HELPER_H */

/* End of File */
